package com.spring.sunflower.conversation

import com.spring.sunflower.base.BaseObserver
import com.spring.sunflower.base.BasePresenter
import com.spring.sunflower.bean.CallRecordBean

/**
 * Created by Kevin on 2021/9/1<br/>
 *
 * Describe:<br/>
 */
class CallRecordPresenter(baseView: ConversationContract.CallRecordView) :
    BasePresenter<ConversationContract.CallRecordView>(baseView) {
    fun getCallRecord(pageIndex: String) {
        val observable = requestDataSource.getCallRecord(pageIndex)
        addDisposable(observable, object : BaseObserver<CallRecordBean>(baseView) {
            override fun onSuccess(bean: CallRecordBean) {
                baseView.showCallRecord(bean.datas!!)
            }

            override fun onError(status: Int, msg: String?) {
            }
        })
    }
}